import { useNavigate } from "react-router-dom"
function App() {
  const navigate = useNavigate();
  const toText = () => {
    navigate('/text')
  }
  return (
    <>
      app
      <button onClick={toText}>跳转</button>
    </>
  )
}

export default App
